<?php

// This file is part of the Carrington Mobile Theme for WordPress
// http://carringtontheme.com
//
// Copyright (c) 2008-2009 Crowd Favorite, Ltd. All rights reserved.
// http://crowdfavorite.com
//
// Released under the GPL license
// http://www.opensource.org/licenses/gpl-license.php
//
// **********************************************************************
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
// **********************************************************************

if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }
if (CFCT_DEBUG) { cfct_banner(__FILE__); }

?>
<?php 
	$postid = get_the_ID();
	$cat=get_query_var('cat');
	//var_dump(the_post_parent());
	$link=get_permalink($postid);
	if ( has_post_thumbnail($postid)) {
	   $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($postid), 'large');
	   echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
	   echo get_the_post_thumbnail($postid, array(30,30), array('class' => 'alignleft'));
	   echo '</a>';
 	}else{
 		echo '<a href="http://wap.moba.vn/wp-content/uploads/2011/07/moba.jpg" title="moba" ><img width="30" height="30" src="http://wap.moba.vn/wp-content/uploads/2011/07/moba.jpg" class="alignleft wp-post-image" alt="moba" title="moba" /></a>';
 	}  
	?>
<a href="<?php 
		if($cat){
			echo $link."&cat=".$cat;
		}else{
			the_permalink();
		}?>" >
 <?php  the_title(); ?>
 <span class="date">(<?php the_time('d-m-Y');?>)
<!-- <img class="thumb" src="http://wap.moba.vn/wp-content/uploads/<?php echo get_post_meta($postid,'_wp_attached_file',true); ?>" alt="" width="20px" height="20px" />-->
 	<?php 
		$p=get_post_meta($postid,'Level',true); 
	 	if($p=='Hot'){
	 		echo '<img class="thumb" src="http://wap.moba.vn/wp-content/uploads/2011/07/hot.gif" alt="" />';
		}else if($p=='New'){
	 		echo '<img class="thumb" src="http://wap.moba.vn/wp-content/uploads/2011/07/new.gif" alt="" />';		
		} 
	?>
</span></a> 
<div style="clear:both"></div>